package com.example.musicplayer.tools;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 显示时间测试代码
 */
public class TestTime {
    public static void main(String[] args) {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        String time = simpleDateFormat.format(new Date());
        System.out.println("当前的时间" + time);


        SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String time2 = simpleDateFormat2.format(new Date());
        System.out.println("当前的时间" + time2);

    }
}
